﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using System.ServiceModel.Web;
using PRET.ReportDataDefine.UIData;

namespace PRET.PRETWebService
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IPRETService”。
    [ServiceContract]
    public interface IPRETWebServiceJSON
    {
        /// <summary>
        /// 组态界面，显示生产线运行状态
        /// </summary>
        /// <param name="orderID"></param>
        /// <remarks>
        /// 为实现Json序列化，添加属性
        /// [WebInvoke(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
        /// </remarks>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "getProLineStatus")]
        List<ProductionReportSummaryForJSON> GetProLineStatus();

        /// <summary>
        /// 获得生产任务信息
        /// </summary>
        /// <remarks>
        /// 为实现Json序列化，添加属性, 如果定义WebMessageBodyStyle.Wrapped则会添加一个功能名前缀，如：[GetProductiveTaskResult:[]]
        /// [WebInvoke(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
        /// </remarks>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "getProductiveTask")]
        List<ProductiveTaskReportTV> GetProductiveTask();

        /// <summary>
        /// 生产线效率数据
        /// </summary>
        /// <param name="year"></param>
        /// <remarks>
        /// 为实现Json序列化，添加属性, 如果定义WebMessageBodyStyle.Wrapped则会添加一个功能名前缀，如：[GetProductionLineEfficiencyResult:[]]
        /// [WebInvoke(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
        /// </remarks>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "getProductionLineEfficiency/{year}")]
        List<ProductionLineEfficiencyReport> GetProductionLineEfficiency(string year);

        /// <summary>
        /// 班组效率
        /// </summary>
        /// <param name="year"></param>
        /// <remarks>
        /// 为实现Json序列化，添加属性, 如果定义WebMessageBodyStyle.Wrapped则会添加一个功能名前缀，如：[GetTeamEfficiencyResult:[]]
        /// [WebInvoke(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
        /// </remarks>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "getTeamEfficiency/{year}")]
        List<TeamEfficiencyReport> GetTeamEfficiency(string year);

        /// <summary>
        /// 显示文字信息
        /// </summary>
        /// <remarks>
        /// [WebInvoke(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
        /// </remarks>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "showMessage")]
        String ShowMessage();
        //TVControlInfo ShowMessage();

        /// <summary>
        /// 获得显示配置信息
        /// </summary>
        /// <remarks>
        /// [WebInvoke(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
        /// </remarks>
        /// <returns></returns>
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "getShowConfig")]
        ShowConfig GetShowConfig();
    }
}
